<template>
  <div class="page-wrapper">
    <input id="topicId" type="hidden" value="1691"/>
    <input id="isAdmin" type="hidden" value=""/>
    <input id="STATICURL" type="hidden" value="//static.clewm.net/cli"/>

    <!-- Top Menu Solution -->
    <div class="top-menu-solution" id="top-nav-solution-popcontent">
      <div class="top-nav__container">
        <div class="header-products-popover clearfix none">
          <div class="wrapper">
            <div class="main-content">
              <div class="columns">
                <div class="product-column">
                  <div class="column-title">活码引擎</div>
                  <a class="column-item" href="help/100495.html" target="_blank" title="内容展示">
                    <div class="item-title">内容展示</div>
                    <div class="item-desc">内容丰富、随时更新的展示平台</div>
                  </a>
                  <a class="column-item" href="form.html" target="_blank" title="表单">
                    <div class="item-title">表单</div>
                    <div class="item-desc">关联表单实现扫码填写和查看记录</div>
                  </a>
                  <a class="column-item" href="help/82877.html" target="_blank" title="状态">
                    <div class="item-title">状态</div>
                    <div class="item-desc">在二维码上显示物品当前状态</div>
                  </a>
                  <a class="column-item" href="help/68330.html" target="_blank" title="动态数据">
                    <div class="item-title">动态数据</div>
                    <div class="item-desc">在码上展示操作记录和填表统计</div>
                  </a>
                </div>
                <div class="product-column">
                  <div class="column-title">管理与协作</div>
                  <a class="column-item" href="help/74737.html" target="_blank" title="数据管理">
                    <div class="item-title">数据管理</div>
                    <div class="item-desc">多维度统计表单、状态等数据</div>
                  </a>
                  <a class="column-item" href="help/68920.html" target="_blank" title="成员功能">
                    <div class="item-title">成员功能</div>
                    <div class="item-desc">组织内外、成员间分工管理</div>
                  </a>
                  <a class="column-item" href="help/74757.html" target="_blank" title="通知与协作">
                    <div class="item-title">通知与协作</div>
                    <div class="item-desc">异常、审核、计划等消息实时提醒</div>
                  </a>
                  <a class="column-item" href="help/63847.html" target="_blank" title="计划管理">
                    <div class="item-title">计划管理</div>
                    <div class="item-desc">按周期制定巡检计划，避免漏检</div>
                  </a>
                </div>
                <div class="product-column">
                  <div class="column-title">AI 功能</div>
                  <a class="column-item" href="case/detail/2385.html" target="_blank" title="AI 解读">
                    <div class="item-title">
                      AI 解读
                      <div class="new-feature-tag"><span class="tag-text">New</span></div>
                    </div>
                    <div class="item-desc">AI 解读长内容，帮扫码者快速找到需要信息</div>
                  </a>
                  <a class="column-item" href="help/102357.html" target="_blank" title="AI 智能填表">
                    <div class="item-title">
                      AI 智能填表
                      <div class="new-feature-tag"><span class="tag-text">New</span></div>
                    </div>
                    <div class="item-desc">AI 自动识别拍摄照片，智能填充表单</div>
                  </a>
                  <a class="column-item" href="help/102615.html" target="_blank" title="AI 表单组件">
                    <div class="item-title">
                      AI 表单组件
                      <div class="new-feature-tag"><span class="tag-text">New</span></div>
                    </div>
                    <div class="item-desc">AI 识别表格单据、证件或实物照片等</div>
                  </a>
                  <a class="column-item" href="help/99528.html" target="_blank" title="AI 图片审核">
                    <div class="item-title">AI 图片审核</div>
                    <div class="item-desc">AI 审核扫码者上传的图片是否符合要求</div>
                  </a>
                </div>
                <div class="product-column">
                  <div class="column-title">集成与连接</div>
                  <a class="column-item" href="open-api/intro/intro.html" target="_blank" title="草料开放平台">
                    <div class="item-title">草料开放平台</div>
                    <div class="item-desc">开放API，支持数据同步与批量标签等</div>
                  </a>
                  <a class="column-item" href="wxwork/index.html" target="_blank" title="企业微信版">
                    <div class="item-title">企业微信版</div>
                    <div class="item-desc">在企业微信中使用草料二维码</div>
                  </a>
                  <a class="column-item" href="help/57645.html" target="_blank" title="蚂蚁区块链存证">
                    <div class="item-title">蚂蚁区块链存证</div>
                    <div class="item-desc">数据记录上链保存，确保不被篡改</div>
                  </a>
                  <a class="column-item" href="help/56845.html" target="_blank" title="数据推送">
                    <div class="item-title">数据推送</div>
                    <div class="item-desc">结合数据api，应用草料数据，搭建看板</div>
                  </a>
                </div>
                <div class="product-column">
                  <div class="column-title">批量与标签</div>
                  <a class="column-item" href="batch.html" target="_blank" title="批量生码">
                    <div class="item-title">批量生码</div>
                    <div class="item-desc">使用批量模板，批量生成子码及管理</div>
                  </a>
                  <a class="column-item" href="label.html" target="_blank" title="标签制作">
                    <div class="item-title">标签制作</div>
                    <div class="item-desc">150+标签样式，内容可以灵活调整</div>
                  </a>
                  <a class="column-item" href="help/49343.html" target="_blank" title="排版印刷">
                    <div class="item-title">排版印刷</div>
                    <div class="item-desc">提供多种打印格式与指南，快速落地</div>
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="header_solution_linkCotent">
          <div class="desc">
            <p class="desc-main">各行各业的<br/>二维码应用方案汇总</p>
            <p class="desc-sub">目前已有数十万用户在草料搭建了二维码业务系统，我们将用户的使用经验整理成了应用方案。</p>
          </div>
          <div class="linkCotent-box">
            <div class="linkCotent-scenes-wrapper">
              <div class="linkCotent-scenes-title">场景应用</div>
              <div class="linkCotent-scenes-body">
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1683.html" @click="StatisticsData(338,10001683)" target="_blank">
                      <span>产品介绍</span>
                      <span class="linkCotent-scenes-item-desc">产品宣传、使用说明、产品画册等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1688.html" @click="StatisticsData(338,10001688)" target="_blank">
                      <span>设备巡检</span>
                      <span class="linkCotent-scenes-item-desc">消防巡检、设备点检、维修保养等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1684.html" @click="StatisticsData(338,10001684)" target="_blank">
                      <span>签到报名</span>
                      <span class="linkCotent-scenes-item-desc">会议签到、活动报名、扫码核销等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1689.html" target="_blank">
                      <span>人员管理</span>
                      <span class="linkCotent-scenes-item-desc">实名管理、人员档案、培训记录等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2257.html" id="scene-1064" target="_blank">
                      <span>业务介绍</span>
                      <span class="linkCotent-scenes-item-desc">公司介绍、旅游行程、业务说明等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1685.html" @click="StatisticsData(338,10001685)" target="_blank">
                      <span>固定资产</span>
                      <span class="linkCotent-scenes-item-desc">资产标签、领用登记、车辆管理等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1942.html" @click="StatisticsData(338,10001942)" target="_blank">
                      <span>信息展示</span>
                      <span class="linkCotent-scenes-item-desc">教学培训、办事指南、展品介绍等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1690.html" @click="StatisticsData(338,10001690)" target="_blank">
                      <span>区域巡查</span>
                      <span class="linkCotent-scenes-item-desc">隐患排查、安全巡查、管线巡查等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1417.html" id="scene-1060" target="_blank">
                      <span>出入登记</span>
                      <span class="linkCotent-scenes-item-desc">访客登记、访客预约、来访指引等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2256.html" id="scene-2256" target="_blank">
                      <span>消防安全</span>
                      <span class="linkCotent-scenes-item-desc">灭火器、消火栓检查，安全宣讲等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2259.html" id="scene-1058" target="_blank">
                      <span>信息收集</span>
                      <span class="linkCotent-scenes-item-desc">意见反馈、调查问卷、领用登记等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2260.html" id="scene-1146" target="_blank">
                      <span>标牌标识</span>
                      <span class="linkCotent-scenes-item-desc">危废标签、商户门牌、景区介绍等</span>
                    </a>
                  </div>
                </div>
              </div>
            </div>
            <div class="linkCotent-industry-wrapper">
              <div class="linkCotent-scenes-title">行业应用</div>
              <div class="linkCotent-scenes-body">
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1900.html" @click="StatisticsData(338,180028)" target="_blank">
                      <span>生产制造</span>
                      <span class="linkCotent-scenes-item-desc">一物一码动态数据，管理生产现场</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2265.html" id="scene-1720" target="_blank">
                      <span>教育培训</span>
                      <span class="linkCotent-scenes-item-desc">培训业务介绍、材料收集、借还登记等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2261.html" @click="StatisticsData(338,180029)" target="_blank">
                      <span>建筑施工</span>
                      <span class="linkCotent-scenes-item-desc">用二维码管理施工现场的全套方案</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/498.html" id="scene-1188" target="_blank">
                      <span>文化旅游</span>
                      <span class="linkCotent-scenes-item-desc">行程介绍、路线汇总、酒店入住指南等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/1091.html" @click="StatisticsData(338,180030)" target="_blank">
                      <span>能源电力</span>
                      <span class="linkCotent-scenes-item-desc">设备巡检、区域巡查、人员管理等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2264.html" id="scene-1478" target="_blank">
                      <span>行政事业单位</span>
                      <span class="linkCotent-scenes-item-desc">办事指南、业务办理、村务公开等</span>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2263.html" @click="StatisticsData(338,180031)" target="_blank">
                      <span>物业后勤</span>
                      <span class="linkCotent-scenes-item-desc">设备维保、访客登记、绿化养护等</span>
                    </a>
                  </div>
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title display-flex" href="client.html" @click="StatisticsData(338,180032)" target="_blank">
                      <span>查看更多用户应用经验</span>
                      <i class="clifont anticon-cli-angle-right show"></i>
                    </a>
                  </div>
                </div>
                <div class="linkCotent-scenes-row">
                  <div class="linkCotent-scenes-column">
                    <a class="linkCotent-scenes-item-title" href="case/detail/2262.html" id="scene-1311" target="_blank">
                      <span>医疗卫生</span>
                      <span class="linkCotent-scenes-item-desc">医疗设备管理、健康宣教、消毒记录等</span>
                    </a>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <i class="clifont anticon-cli-close-1 top-menu-solution-close"></i>
      </div>
      <div class="top-nav__mask"></div>
    </div>


    <!-- 导航菜单 -->
    <nav class="cli_nav new-light scene_mobile clearfix">
      <ul class="sub_nav sub_mobile_nav cli_head_container clearfix">
        <li><router-link class="t06971093650622ab_sep [navigation_text]" to="/qrcode/text" @click="StatisticsData(120,11)" title="生成文本二维码">文本</router-link></li>
        <li><router-link class="tab_sep [navigation_url]" to="/qrcode/url" @click="StatisticsData(120,12)" title="生成网址二维码">网址</router-link></li>
        <li><router-link class="tab_sep [navigation_files]" to="/qrcode/files" @click="StatisticsData(120,13)" title="生成文件二维码">文件</router-link></li>
        <li><router-link class="tab_sep [navigation_img]" to="/qrcode/img" @click="StatisticsData(120,14)" title="生成图片二维码">图片</router-link></li>
        <li><router-link class="tab_sep [navigation_multimedia]" to="/qrcode/multimedia" @click="StatisticsData(120,15)" title="生成音视频二维码">音视频</router-link></li>
        <li><router-link class="tab_sep [navigation_vcard]" to="/qrcode/vcard" @click="StatisticsData(120,16)" title="名片二维码">名片</router-link></li>
        <li><router-link class="tab_sep [navigation_weixin]" to="/qrcode/weixin" @click="StatisticsData(120,17)" title="美化微信二维码">微信</router-link></li>
        <li><router-link class="tab_sep on [navigation_form]" to="/qrcode/form" @click="StatisticsData(120,124001)" title="记录表单">表单</router-link></li>
        <li><router-link class="tab_sep [navigation_batch]" to="/qrcode/batch" title="批量生码">批量生码</router-link></li>
        <li><router-link class="tab_sep [navigation_tools]" to="/qrcode/tools" @click="StatisticsData(120,161)" title="更多高级功能">更多工具</router-link></li>
        <li class="pull-right right-nav-items none-after-form">
          <ul>
            <li class="pull-left nav-tool-popover-scan-new">
              <router-link class="template-code" data-analyze="8,118010" to="/qrcode/template" id="__index_template">
                <i class="clifont anticon-moban1"></i>
                模板库建码
              </router-link>
            </li>
          </ul>
        </li>
      </ul>
    </nav>

    <!-- 主要内容区域 -->
    <div class="wrapper new-light mobile-scene-min-width" id="page-record">
      <div class="show-header-offset-el new-light record-banner page-main-content" data-clilog-ele-view="220,18" data-ele-view="banner">
        <h1 data-clilog-ele-view="1, 118044" data-ele-view="index-form-nc-v2-banner-title">专为现场扫码设计的表单</h1>
        <div class="createFormWrapper">
          <a class="partialCard blankCard createFormItem" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&newTpl=1" rel="nofollow" target="_blank">
            <div class="createFormItem-content">
              <span class="clifont anticon-cli-add-1 indicator"></span>
              <p class="nameText">新建空白表单</p>
            </div>
          </a>
          <a class="partialCard blankCard createFormItem" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&create_type=word" rel="nofollow" target="_blank">
            <div class="createFormItem-content">
              <img alt="icon" class="indicator icon-img" src="../../assets/images/86f2099e0203.png"/>
              <p class="nameText">一句话生成表单</p>
              <img alt="icon" class="ai-icon" src="../../assets/images/8069e5a8d6ed.png"/>
            </div>
          </a>
          <a class="partialCard blankCard createFormItem" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&create_type=file" rel="nofollow" target="_blank">
            <div class="createFormItem-content">
              <span class="clifont anticon-shangchuanwenjian indicator"></span>
              <p class="nameText">上传文件生成表单</p>
              <img alt="icon" class="ai-icon" src="../../assets/images/8069e5a8d6ed.png"/>
            </div>
          </a>
          <a class="partialCard blankCard createFormItem" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&create_type=image" rel="nofollow" target="_blank">
            <div class="createFormItem-content">
              <span class="clifont anticon-shangchuantupian indicator"></span>
              <p class="nameText">上传图片生成表单</p>
              <img alt="icon" class="ai-icon" src="../../assets/images/8069e5a8d6ed.png"/>
            </div>
          </a>
        </div>

        <div class="topContainerTitle">也可以使用以下模板进行创建</div>
        <div class="topContainer">
          <section class="halfSection">
            <p class="sectTitle">支持收集图片、视频、文件、签名等信息</p>
            <div class="cardRow">
              <a class="partialCard" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&activeNavId=s_1" rel="noindex,nofollow" target="_blank">
                <div>
                  <div class="hover-hidden">
                    <span class="clifont anticon-qiandaobaoming indicator"></span>
                  </div>
                  <p class="nameText">签到报名</p>
                  <p class="subNameText hover-show">11个表单模板</p>
                </div>
              </a>
              <a class="partialCard" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&activeNavId=s_2" rel="noindex,nofollow" target="_blank">
                <div>
                  <div class="hover-hidden">
                    <span class="clifont anticon-churudengji indicator"></span>
                  </div>
                  <p class="nameText">出入登记</p>
                  <p class="subNameText hover-show">12个表单模板</p>
                </div>
              </a>
              <a class="partialCard" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&activeNavId=s_3" rel="noindex,nofollow" target="_blank">
                <div>
                  <div class="hover-hidden">
                    <span class="clifont anticon-shujushenhe indicator"></span>
                  </div>
                  <p class="nameText">审核审批</p>
                  <p class="subNameText hover-show">8个表单模板</p>
                </div>
              </a>
              <a class="partialCard" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&activeNavId=s_5" rel="noindex,nofollow" target="_blank">
                <div>
                  <div class="hover-hidden">
                    <span class="clifont anticon-gonggao2 indicator"></span>
                  </div>
                  <p class="nameText">留言建议</p>
                  <p class="subNameText hover-show">8个表单模板</p>
                </div>
              </a>
              <a class="partialCard" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&activeNavId=s_9" rel="noindex,nofollow" target="_blank">
                <div>
                  <div class="hover-hidden">
                    <span class="clifont anticon-duoxuanxiang indicator"></span>
                  </div>
                  <p class="nameText">考试考核</p>
                  <p class="subNameText hover-show">8个表单模板</p>
                </div>
              </a>
              <a class="partialCard" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236&activeNavId=s_10" rel="noindex,nofollow" target="_blank">
                <div>
                  <div class="hover-hidden">
                    <span class="clifont anticon-signature indicator"></span>
                  </div>
                  <p class="nameText">承诺书签字</p>
                  <p class="subNameText hover-show">7个表单模板</p>
                </div>
              </a>
            </div>
            <footer class="linkFooter">
              <a class="linkItem" href="//console.cli.im/record/custompagenew?isFromFontCreate=1&create_from=236" rel="noindex,nofollow" target="_blank">
                <span class="clifont anticon-fuyongmoban linkIcon"></span>表单模板库
              </a>
              <a class="linkItem" href="help/67827.html" target="_blank">
                <span class="clifont anticon-bangzhuwendang linkIcon"></span>草料快速入门教程
              </a>
            </footer>
          </section>

          <section class="halfSection">
            <p class="sectTitle">多表单组合，配合一物一码生成电子履历</p>
            <div class="cardRow">
              <a class="tmplCard" href="template/category/1.html" target="_blank">
                <div class="tempIcon hover-hidden">
                  <span class="clifont anticon-shebeixunjianyuweibao indicator"></span>
                </div>
                <div class="nameText">
                  设备巡检
                  <p class="subNameText hover-hidden">防假检漏检</p>
                  <p class="subNameText hover-show">25个二维码模板</p>
                </div>
                <span class="clifont anticon-cli-angle-right arrow-icon hover-show"></span>
              </a>
              <a class="tmplCard" href="template/category/13.html" target="_blank">
                <div class="tempIcon hover-hidden">
                  <span class="clifont anticon-a-gudingzichanguanli1 indicator"></span>
                </div>
                <div class="nameText">
                  固定资产管理
                  <p class="subNameText hover-hidden">扫码可领用、盘点、报修</p>
                  <p class="subNameText hover-show">11个二维码模板</p>
                </div>
                <span class="clifont anticon-cli-angle-right arrow-icon hover-show"></span>
              </a>
              <a class="tmplCard" href="template/category/8.html" target="_blank">
                <div class="tempIcon hover-hidden">
                  <span class="clifont anticon-a-quyuxuncha1 indicator"></span>
                </div>
                <div class="nameText">
                  区域巡查
                  <p class="subNameText hover-hidden">上报隐患、及时反馈</p>
                  <p class="subNameText hover-show">14个二维码模板</p>
                </div>
                <span class="clifont anticon-cli-angle-right arrow-icon hover-show"></span>
              </a>
              <a class="tmplCard" href="template/category/162.html" target="_blank">
                <div class="tempIcon hover-hidden">
                  <span class="clifont anticon-zuoce-geipaishuiyuxiaofang indicator"></span>
                </div>
                <div class="nameText">
                  消防安全
                  <p class="subNameText hover-hidden">一灭火器一码，扫码检查</p>
                  <p class="subNameText hover-show">23个二维码模板</p>
                </div>
                <span class="clifont anticon-cli-angle-right arrow-icon hover-show"></span>
              </a>
            </div>
            <footer class="linkFooter">
              <a class="linkItem" href="template.html" target="_blank">
                <span class="clifont anticon-fuyongmoban linkIcon"></span>二维码模板库
              </a>
              <a class="linkItem" href="help/82116.html" target="_blank">
                <span class="clifont anticon-fuyong linkIcon"></span>表单和二维码的关系
              </a>
            </footer>
          </section>
        </div>

        <!-- 特色功能区域 -->
        <div class="featureTitle">适合企业日常工作的特色功能</div>
        <div class="featureSection">
          <p class="marketingTitle">针对现场工作设计</p>
          <div class="marketingRow">
            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/78771')">
              <div>
                <span class="nameText">现场填写防作假</span>
                <p class="subNameText">结合图片水印，定位，填写限制等功能实现数据防作假</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/78771.html" @click="stopEvent" target="_blank">
                    <span>图片水印<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/54083.html" @click="stopEvent" target="_blank">
                    <span>填写限制<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/52738')">
              <div>
                <span class="nameText">获取凭证现场出示</span>
                <p class="subNameText">提交可生成编号凭证，或核销码，可扫码验证核销</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/52738.html" @click="stopEvent" target="_blank">
                    <span>提交成功页<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="case/detail/1417.html" @click="stopEvent" target="_blank">
                    <span>出入登记应用方案<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/82910')">
              <div>
                <span class="nameText">扫码可查看电子履历</span>
                <p class="subNameText">设备/人员全周期数据沉淀，扫码追溯完整记录</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/82910.html" @click="stopEvent" target="_blank">
                    <span>动态数据面板<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="case/detail/1688.html" @click="stopEvent" target="_blank">
                    <span>设备巡检应用方案<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard new-feature-card" data-tea-container="true" @click="openUrl('https://cli.im/help/102357')">
              <div>
                <span class="nameText">
                  借助AI提升填表效率
                  <div class="new-feature-tag"><span class="tag-text">New</span></div>
                </span>
                <p class="subNameText">AI自动分析图片，理解图片内容，自动判断选项或提取文字信息</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/102357.html" @click="stopEvent" target="_blank">
                    <span>AI智能填表<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <div class="inlineLinks">
                    <a class="linkText cliLink" href="help/102615.html" @click="stopEvent" target="_blank">
                      <span>AI组件<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                    </a>
                    <a class="linkText cliLink" href="help/94236.html" @click="stopEvent" target="_blank">
                      <span>自动填充<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                    </a>
                  </div>
                </div>
              </div>
            </div>
          </div>

          <p class="marketingTitle">后续协作</p>
          <div class="marketingRow">
            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/51912')">
              <div>
                <span class="nameText">异常数据实时预警</span>
                <p class="subNameText">微信公众号自动推送异常表单数据，快速响应问题</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/51912.html" @click="stopEvent" target="_blank">
                    <span>消息提醒<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/86484.html" @click="stopEvent" target="_blank">
                    <span>故障报修场景应用<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/49075')">
              <div>
                <span class="nameText">逐级审批引擎</span>
                <p class="subNameText">部门→主管→高管流转审批，审批记录永久留存</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/49075.html" @click="stopEvent" target="_blank">
                    <span>数据审批<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/86512.html" @click="stopEvent" target="_blank">
                    <span>内部审批场景应用<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/82977')">
              <div>
                <span class="nameText">处理进度实时看板</span>
                <p class="subNameText">表单记录标记+统计，关键指标自动生成闭环看板</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/82977.html" @click="stopEvent" target="_blank">
                    <span>处理进度<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/81942.html" @click="stopEvent" target="_blank">
                    <span>区域巡查应用方案<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/63847')">
              <div>
                <span class="nameText">周期性计划</span>
                <p class="subNameText">超期自动提醒，管理井井有条</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/63847.html" @click="stopEvent" target="_blank">
                    <span>计划管理<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>
          </div>

          <p class="marketingTitle">数据存档与管理</p>
          <div class="marketingRow">
            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/96049')">
              <div>
                <span class="nameText">多平台数据同步</span>
                <p class="subNameText">表单数据同步至腾讯文档/企微/钉钉，打破系统孤岛</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/96049.html" @click="stopEvent" target="_blank">
                    <span>对接腾讯文档<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/95443.html" @click="stopEvent" target="_blank">
                    <span>对接企微/钉钉/飞书<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/61805')">
              <div>
                <span class="nameText">可视化报表和大屏</span>
                <p class="subNameText">开放API接口支持BI工具同步，数据看板无缝对接</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/61805.html" @click="stopEvent" target="_blank">
                    <span>数据API+百度SugarBI<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/94931.html" @click="stopEvent" target="_blank">
                    <span>可视化看板合集<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/86589')">
              <div>
                <span class="nameText">PDF文件自动存档</span>
                <p class="subNameText">单条/批量数据一键导出，样式可自定义</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/86589.html" @click="stopEvent" target="_blank">
                    <span>单条数据导出格式<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/94450.html" @click="stopEvent" target="_blank">
                    <span>汇总数据打印设置<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>

            <div class="marketingCard" data-tea-container="true" @click="openUrl('https://cli.im/help/57645')">
              <div>
                <span class="nameText">可信数据存证</span>
                <p class="subNameText">基于蚂蚁链实现表单数据上链，防篡改可追溯</p>
              </div>
              <div>
                <div class="diveLine"></div>
                <div class="blogTutor">
                  <a class="linkText cliLink" href="help/57645.html" @click="stopEvent" target="_blank">
                    <span>蚂蚁区块链存证<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                  <a class="linkText cliLink" href="help/85645.html" @click="stopEvent" target="_blank">
                    <span>区块链存证场景应用<span class="clifont anticon-el-icon-arrow-right linkIcon"></span></span>
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- Tab内容区域 -->
    <div class="tab-file-box new-light bottom-white-line">
      <div class="page-main-content">
        <div class="nav-fixed-empty"></div>
        <div id="tab-nav">
          <ul class="tab-ul list_tab page-main-content">
            <li class="tab-item noMarginLeft active" data-id="4558" data-name="功能介绍" data-tab-id="4558" data-tab-item="" data-tab-path="info" data-tab-type="blog" data-tab-url="/form" data-type="表单">
              <a href="form.html" rel="canonical" title="功能介绍">功能介绍</a>
            </li>
            <li class="tab-item" data-id="17317" data-name="场景应用" data-tab-id="17317" data-tab-item="" data-tab-path="case" data-tab-type="blog" data-tab-url="/form/case" data-type="表单">
              <a href="form/case.html" rel="canonical" title="场景应用">场景应用</a>
            </li>
            <li class="tab-item" data-id="4559" data-name="讨论" data-tab-id="4559" data-tab-item="" data-tab-path="comment" data-tab-type="comment" data-tab-url="/form/comment" data-type="表单">
              <a href="form/comment.html" id="comment-tab-item" rel="canonical" title="讨论">讨论(2111)</a>
            </li>
          </ul>
        </div>
      </div>
    </div>

    <!-- 白色内容区域 -->
    <div class="white tab-form-box">
      <div class="page-main-content">
        <div id="new-blog-container"></div>
        <div class="tab-form-box-content with-blog-outline">
          <div class="article-tab-box clearfix" id="article">
            <div class="wordpress-article">
              <div class="wiki wordpress-article-box doc-content inline" id="wordpress_article_box">
                <div class="wait-now" id="wait_now" style="display: none;">
                  <img alt="loading" src="../../assets/images/cbd0851f409c.gif"/>
                </div>
                <div class="wordpress_article_info_box entry-content" id="wordpress_article_info_box">
                  <h2>使用草料表单，你可以实现：</h2>
                  <h3>1. 结合动态数据面板，实时查看和管理操作记录</h3>
                  <ul>
                    <li><a href="help/82910.html" title="动态数据面板">动态数据面板</a>是用于查看二维码的所有历史操作记录的一个展示界面。</li>
                    <li>每次用户进行操作（如提交表单或<a href="help/92522.html" title="更新状态">更新状态</a>），都会在该面板上记录下来。</li>
                    <li>动态数据面板与表单结合，可以实现：</li>
                  </ul>
                  <p><img alt="" data-height="1020" data-width="2280" src="../../assets/images/9b994e5f290d.png"/></p>

                  <h3>2. 后续处理与协作</h3>
                  <ul>
                    <li>每条表单记录都会生成详细的记录详情页。</li>
                    <li>在表单设置中开启<a href="help/82977.html" title=" 处理进度 "> 处理进度 </a>功能，一线人员提交表单记录后，每条表单数据都可以实时标记处理进度，用于跟进和统计。</li>
                    <li><a href="help/82975.html" title="后续动态功能">后续动态功能</a>类似于评论区，一线人员提交表单记录后，可在表单数据详情页进行协作和沟通。</li>
                    <li>适用于<a href="template/detail/121463037/20.html" title="设备巡检">设备巡检</a>、<a href="template/detail/4111148.html" title="隐患上报">隐患上报</a>等场景。</li>
                  </ul>
                  <p><img alt="" data-height="1096" data-width="2280" src="../../assets/images/cd7eb6ede85b.png"/></p>

                  <h3>3. PDF导出功能</h3>
                  <p>平台提供<a href="help/86589.html" title="单条数据导出">单条数据导出</a>、<a href="help/94450.html" title="汇总数据导出">汇总数据导出</a>两种PDF导出功能，以满足不同的业务需求</p>
                  <p><img alt="" data-height="874" data-width="2280" src="../../assets/images/693a867b54f4.png"/></p>

                  <h3>4. 实时消息推送，异常消息提醒</h3>
                  <ul>
                    <li>当用户提交表单或更新设备状态时，系统会根据预设的提醒规则，通过微信公众号<a href="help/51912.html" title="实时推送消息">实时推送消息</a>给相关人员。</li>
                    <li>系统支持通过<a href="help/95443.html" title="数据API功能">数据API功能</a>，将通知通过企业微信、钉钉或飞书等工具推送到群聊。帮助团队快速响应，并提高协作效率。</li>
                  </ul>
                  <p><img alt="" data-height="1096" data-width="2280" src="../../assets/images/c67fdeb7d7f7.png"/></p>

                  <h3>5. 逐级审批功能</h3>
                  <ul>
                    <li>平台支持设置一级或多级<a href="help/49075.html" title="审批流程">审批流程</a>。</li>
                    <li>用户提交表单后，审批人会收到通知。</li>
                    <li>可以根据需求设置单级或多级审批流程，每一级审批都支持手写签名和快速回复。</li>
                  </ul>
                  <p><img alt="" data-height="1096" data-width="2280" src="../../assets/images/02308f6a68e3.png"/></p>

                  <h3>6. 成员管理与权限设置</h3>
                  <p>草料支持根据不同角色设定查看和操作权限，如可以设置只允许特定的<a href="help/68920.html" title="成员">成员</a>填写表单，查看表单数据</p>
                  <p><img alt="" data-height="1068" data-width="2280" src="../../assets/images/78cdeb733978.png"/></p>

                  <h3>7. 二维码凭证与核销</h3>
                  <p>通过表单提交生成的<a href="help/85203.html" title="二维码凭证">二维码凭证</a>，用户可以使用该凭证进行报名、通行、物品领用等操作，适用于：</p>
                  <ul>
                    <li><a href="template/detail/12244817.html" title="报名场景">报名场景</a>：申请人填写表单报名，自动获取核销二维码，入场时核销。</li>
                    <li><a href="template/detail/38241419.html" title="出入登记场景">出入登记场景</a>：来访者填写登记表单生成临时通行证，扫码核销。</li>
                    <li><a href="template/detail/48728762.html" title="物品领用场景">物品领用场景</a>：申请人填写表单生成二维码，仓库管理员扫码核销并发放物资。</li>
                  </ul>
                  <p><img alt="" data-height="1096" data-width="2280" src="../../assets/images/5846d104b84b.png"/></p>

                  <h2>相关阅读</h2>
                  <p>
                    <a href="help/82116.html" title="表单和二维码的关系">表单和二维码的关系</a><br/>
                    <a href="help/86058.html" title="表单功能应用">表单功能应用</a><br/>
                    <a href="help/86484.html" title="故障报修场景应用">故障报修场景应用</a><br/>
                    <a href="help/86497.html" title="对外业务申请办理场景应用">对外业务申请办理场景应用</a><br/>
                    <a href="help/86504.html" title="意见反馈受理场景应用">意见反馈受理场景应用</a><br/>
                    <a href="help/86512.html" title="内部审批进度场景应用">内部审批进度场景应用</a><br/>
                    <a href="help/86833.html" title="手写签名场景应用">手写签名场景应用</a><br/>
                  </p>
                </div>
              </div>
              <div class="wikiOutlineWrapper" ref="outlineWrapper">
                <ul class="wikiOutlineContainer" ref="outlineContainer">
                  <li v-for="(item, index) in outlineItems"
                      :key="index"
                      :class="['item', { active: activeOutlineIndex === index }]"
                      :data-target-header="item.tagName"
                      @click="scrollToHeader(item, index)">
                    <span>{{ item.text }}</span>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 评论弹窗 -->
    <div class="modal fade" data-backdrop="static" id="modal-alert-comment-box">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header" style="padding:15px 15px;border-bottom: none;">
            <button class="close" data-dismiss="modal" id="comment-close-button" style="position: absolute;right: 15px;top: 15px;" type="button">
              <span aria-hidden="true">×</span>
              <span class="sr-only">Close</span>
            </button>
            <h4 class="modal-title"></h4>
          </div>
          <div class="modal-body p-x-md" style="padding-top:0px;padding-bottom:0px;">
            <div id="comment-box"></div>
            <div class="feedback-item clearfix feedback-box">
              <div class="feedback-label">回复方式</div>
              <div class="feedback-content feedback-content-500">
                <div>
                  <label class="radio-inline">
                    <input id="receiveWechat" name="receiveMethodModal" type="radio" value="wechat"/> 微信快捷接收（推荐）
                  </label>
                  <label class="radio-inline">
                    <input id="receiveEmail" name="receiveMethodModal" type="radio" value="email"/> 邮箱接收
                  </label>
                </div>
                <div class="none m-t" id="email-area">
                  <input class="form-control text-xs" id="email" name="email" placeholder="我们将以邮件形式答复你" type="text" value=""/>
                </div>
                <div class="none m-t text-darkgrey" id="wechat-area">
                  <img alt="" class="m-r" id="wechat-qr" src=""/>
                  <div class="logo-in-qrcode">
                    <img alt="loading" src="../../assets/images/28ae6fb6d9ad.png"/>
                  </div>
                  <div class="scan-success none">
                    <i class="fa fa-check text-green"></i> 已关注
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="modal-footer" style="border-top: none;">
            <span class="m-l text-danger none" id="error-message"></span>
            <button class="btn btn-outline b-green text-green" data-dismiss="modal" id="publish-cancel-btn" style="margin-bottom: 0;margin-left: 5px;height: 28px;font-size: 12px;line-height: 11px;width:72px;">取消</button>
            <button class="btn green" data-loading-text="提交中..." id="publish-submit-btn" style="margin-bottom: 0;margin-left: 5px;height: 28px;font-size: 12px;line-height: 12px;width:72px;">提交</button>
          </div>
        </div>
      </div>
    </div>

    <!-- 视频弹窗 -->
    <div class="modal fade" data-backdrop="true" id="modal-intro-video" style="background-color: rgba(0,0,0,.7);">
      <div class="row-col h-v">
        <div class="row-cell v-m">
          <div class="modal-dialog" style="display: table;margin: 0 auto;">
            <div id="dplayer"></div>
          </div>
          <div class="video-close" data-dismiss="modal">
            <i class="clifont anticon-cli-close-1"></i>
          </div>
        </div>
      </div>
    </div>

    <!-- 二维码美化弹窗 -->
    <div class="qr-style-wrapper">
      <div class="qr-style-content">
        <div class="close">×</div>
        <div class="real-content"></div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted, nextTick, onUnmounted } from 'vue'

// 定义组件名称
defineOptions({
  name: 'FormPage'
})

// 定义页面元信息
const metaInfo = {
  title: '表单二维码生成器-草料二维码',
  meta: [
    { name: 'description', content: '草料表单二维码生成器，将表单关联到二维码中，扫码即可填写表单登记信息，支持导出存档，表单数据还能在二维码上展示。' },
    { name: 'keywords', content: '表单二维码,扫码填表,签到二维码,报名二维码,登记表,签到表,记录,记录单,记录表单,巡检表' },
    { property: 'og:title', content: '表单二维码生成器-草料二维码' },
    { property: 'og:description', content: '草料表单二维码生成器，将表单关联到二维码中，扫码即可填写表单登记信息，支持导出存档，表单数据还能在二维码上展示。' },
    { property: 'og:image', content: 'https://gstatic.clewm.net/caoliao-resource/240407/6b2aef_89bd6906.png' },
    { name: 'referrer', content: 'no-referrer-when-downgrade' }
  ],
  link: [
    { rel: 'canonical', href: 'https://cli.im/form' },
    { rel: 'icon', href: '../../assets/images/ceba46bf2ecc.ico', type: 'image/x-icon' },
    { rel: 'shortcut icon', href: '../../assets/images/ceba46bf2ecc.ico', type: 'image/x-icon' }
  ]
}

// 响应式数据定义
const ___ENV = ref<string>('online')
const account = ref<string>('')
const tokenId = ref<string>('')
const user_id = ref<string>('')
const edition_id = ref<number>(1)
const createFrom = ref<number>(133)
const tplCreateFrom = ref<number>(133)

// 二维码配置
const QR_CONFIG = reactive({
  level: "H",
  size: "280",
  bgcolor: "FFFFFF",
  forecolor: "000000",
  dotcolor_o: "000000",
  dotcolor_n: "000000",
  icon: {
    path: "",
    pos: 0,
    zoom: 0
  }
})

// 其他配置变量
const config = reactive({
  static_domain: "//static.clewm.net/cli",
  SOCKETAPISURL: 'https://socket.api.cli.im',
  front_url: "//static.clewm.net/nc/front",
  autoVersion: "1754556853877"
})

// Wiki outline navigator instance
const wikiOutlineNavigatorIns = ref(null)

// Outline navigation state
const outlineItems = ref<Array<{ text: string, tagName: string, element: HTMLElement }>>([])
const activeOutlineIndex = ref(-1)
const isScrolling = ref(false)
const outlineWrapper = ref<HTMLElement>()
const outlineContainer = ref<HTMLElement>()

// 清理函数集合
const cleanupFunctions = ref<Array<() => void>>([])

// 设置全局变量
const setGlobalVariables = (): void => {
  window.___ENV = ___ENV.value
  window.account = account.value
  window.tokenId = tokenId.value
  window.QR_CONFIG = QR_CONFIG
  window.static_domain = config.static_domain
  window.front_url = config.front_url
  window.$autoVersion = config.autoVersion
}

// 初始化基本功能
const initBasicFeatures = (): void => {
  const hash = window.location.hash
  switch(hash) {
    case "#normal":
    case "#product":
    case "#price":
    case "#desc":
    case "#hover":
      createFrom.value = 139
      tplCreateFrom.value = 139
      StatisticsData(1, 118060)
      break
    case "#tools":
      createFrom.value = 135
      tplCreateFrom.value = 135
      StatisticsData(1, 118059)
      break
    case "#index":
      createFrom.value = 137
      tplCreateFrom.value = 137
      StatisticsData(1, 118058)
      break
    default:
      createFrom.value = 133
      tplCreateFrom.value = 133
      StatisticsData(1, 118057)
      break
  }
}

// 统计数据函数
const StatisticsData = (fir: number, sec: number): void => {
  console.log('StatisticsData called:', fir, sec)
  // 这里可以实现具体的统计逻辑
  // 在Vue环境中可以使用axios等发送统计请求
}

// Outline navigation functions
const initOutlineNavigation = () => {
  nextTick(() => {
    collectHeaders()
    setupScrollListener()
  })
}

const collectHeaders = () => {
  // Collect h2 and h3 elements from the wordpress article content
  const headers = document.querySelectorAll('.wordpress_article_info_box h2, .wordpress_article_info_box h3')
  outlineItems.value = Array.from(headers).map((header: HTMLElement) => ({
    text: header.textContent || '',
    tagName: header.tagName,
    element: header
  }))
  
  // Show or hide outline container based on whether there are headers
  if (outlineWrapper.value) {
    if (outlineItems.value.length > 0) {
      outlineWrapper.value.style.display = 'block'
      outlineContainer.value?.classList.add('hasOutline')
    } else {
      outlineWrapper.value.style.display = 'none'
      outlineContainer.value?.classList.remove('hasOutline')
    }
  }
  
  // 延迟计算初始活动状态，确保DOM布局完成
  setTimeout(() => {
    updateActiveOutline()
  }, 200)
}

const setupScrollListener = () => {
  window.addEventListener('scroll', updateActiveOutline)
  
  // 记录清理函数
  cleanupFunctions.value.push(() => {
    window.removeEventListener('scroll', updateActiveOutline)
  })
}

const updateActiveOutline = () => {
  if (isScrolling.value || outlineItems.value.length === 0) return

  let activeIndex = -1 // Start with no active item
  const scrollTop = window.scrollY
  const viewportHeight = window.innerHeight
  const triggerOffset = 100 // 当标题进入视窗上方100px时激活

  // Find the current active header based on scroll position
  for (let i = 0; i < outlineItems.value.length; i++) {
    const element = outlineItems.value[i].element
    const elementTop = element.offsetTop
    const elementBottom = elementTop + element.offsetHeight
    
    // 检查标题是否在激活区域内
    if (scrollTop + triggerOffset >= elementTop && scrollTop < elementBottom + 200) {
      activeIndex = i
      break // 找到第一个匹配的就停止
    }
  }

  // 如果没找到匹配的标题，继续查找最接近的
  if (activeIndex === -1) {
    for (let i = outlineItems.value.length - 1; i >= 0; i--) {
      const element = outlineItems.value[i].element
      if (scrollTop + triggerOffset >= element.offsetTop) {
        activeIndex = i
        break
      }
    }
  }

  activeOutlineIndex.value = activeIndex
}

const isElementScrolled = (element: HTMLElement): boolean => {
  const rect = element.getBoundingClientRect()
  return rect.top <= 100 // Element is considered "scrolled past" when it's 100px from top
}

const scrollToHeader = (item: { element: HTMLElement, text: string }, index: number) => {
  if (activeOutlineIndex.value === index || isScrolling.value) return

  activeOutlineIndex.value = index
  isScrolling.value = true

  // Smooth scroll to the target header
  const offsetTop = item.element.offsetTop
  window.scrollTo({
    top: offsetTop,
    behavior: 'smooth'
  })

  // Reset scrolling flag after animation
  setTimeout(() => {
    isScrolling.value = false
  }, 800)
}

// 初始化滚动追踪
const initScrollTracking = (): void => {
  // 节流函数
  const throttle = (func: Function, delay: number) => {
    let lastTime = 0
    let timer: NodeJS.Timeout | null = null

    return function (this: any, ...args: any[]) {
      const now = Date.now()
      if (lastTime === 0) {
        func.apply(this, args)
        lastTime = now
      }

      if (timer) clearTimeout(timer)
      timer = setTimeout(() => {
        func.apply(this, args)
        lastTime = now
        timer = null
      }, delay)
    }
  }

  const reportScrollPosition = (): void => {
    const scrollPosition = window.scrollY || document.documentElement.scrollTop
    const pageHeight = document.documentElement.scrollHeight
    // 简化版滚动统计
    console.log('Scroll position:', {
      scrollPosition,
      pageHeight,
      readPercent: ((scrollPosition + window.innerHeight) / pageHeight * 100).toFixed(2)
    })
  }

  const throttledScrollHandler = throttle(reportScrollPosition, 250)
  window.addEventListener("scroll", throttledScrollHandler)

  // 记录清理函数
  cleanupFunctions.value.push(() => {
    window.removeEventListener("scroll", throttledScrollHandler)
  })
}

// 打开URL
const openUrl = (url: string): void => {
  window.open(url, '_blank')
}

// 阻止事件冒泡
const stopEvent = (event: Event): void => {
  event.stopPropagation()
}

// 生命周期
onMounted(() => {
  setGlobalVariables()
  initBasicFeatures()

  // 初始化其他功能
  initScrollTracking()

  // 生成侧边导航目录 - 延迟初始化确保DOM完全渲染
  setTimeout(() => {
    // Initialize outline navigation
    initOutlineNavigation()
  }, 100)
})

// 组件卸载时清理
onUnmounted(() => {
  // Cleanup if needed
  wikiOutlineNavigatorIns.value = null
  
  cleanupFunctions.value.forEach(cleanup => cleanup())
  cleanupFunctions.value = []
})
</script>

<!-- 导入CSS文件 -->
<style src="../../assets/css/490815b50ee0.css" scoped/>
<style src="../../assets/css/00b58f2b8f9a.css" scoped/>
<style src="../../assets/css/e88b6e80fbce.css" scoped/>
<style src="../../assets/css/f6d6073f1386.css" scoped/>
<style src="../../assets/css/c1a2dbc35903.css" scoped/>
<style src="../../assets/css/0ff6e05882a2.css" scoped/>
<style src="../../assets/css/b76aaf663b7f.css" scoped/>
<style src="../../assets/css/5e6b9bf9fd2f.css" scoped/>
<style src="../../assets/css/9ded6fd30ce6.css" scoped/>
<style src="../../assets/css/0c9b4a03c1ee.css" scoped/>
<style src="../../assets/css/2034b15460f1.css" scoped/>
<style src="../../assets/css/3b4c1c2135a6.css" scoped/>
<style src="../../assets/css/a1e9de7759bd.css" scoped/>
<style src="../../assets/css/b64637f7e36e.css" scoped/>
<style src="../../assets/css/228034f02af3.css" scoped/>
<style src="../../assets/css/acfff1e57b0e.css" scoped/>
<style src="../../assets/css/3db6acd047a4.css" scoped/>
<style src="../../assets/css/550d0fc5c52a.css" scoped/>
<style src="../../assets/css/7272988962e3.css" scoped/>
<style src="../../assets/css/cac1baa43ce6.css" scoped/>
<style src="../../assets/css/963d993f037a.css" scoped/>
<style src="../../assets/css/82dc0233b1fb.css" scoped/>
<style src="../../assets/css/52f4b4a7ee30.css" scoped/>
